package com.celer.convert;

import com.celer.randomobj.*;
import org.mapstruct.*;
import org.mapstruct.factory.*;

@Mapper(unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface CompanyConvert {

    CompanyConvert INSTANCE = Mappers.getMapper(CompanyConvert.class);

    @Mapping(target = "contactName", source = "name")
    @Mapping(target = "contactPhone", source = "phone")
    @Mapping(target = "contactEmail", source = "email")
    @Mapping(target = "contactIdNumber", source = "idNumber")
    @Mapping(target = "name", ignore = true)
    @Mapping(target = "phone", ignore = true)
    @Mapping(target = "email", ignore = true)
    @Mapping(target = "province", ignore = true)
    @Mapping(target = "city", ignore = true)
    @Mapping(target = "county", ignore = true)
    @Mapping(target = "bankNumber", ignore = true)
    @Mapping(target = "zipCode", ignore = true)
    void covertConcat(@MappingTarget Company company, Person person);
}
